<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">

	<xsl:template match="/canss">
		<html>
			<body>
				<h2>Person List</h2>
				<ol>
					<table class="datatable" width="600">
						<tbody>
							<th scope='col'>
								<center>번호</center>
							</th>
							<th scope='col'>
								<center>ID</center>
							</th>
							<th scope='col'>
								<center>이름</center>
							</th>
							<th scope='col'>
								<center>Type</center>
							</th>
							<th scope='col'>
								<center>가입 일자</center>
							</th>
							<th scope='col'>
								<center>관리</center>
							</th>
						
							<xsl:for-each select="canssPerson_Person">
								<tr>
									<xsl:variable name="v_type" select="canssPerson_type"/>
									<td scope='col'>
										<center><xsl:number format="1"/></center>
									</td>
									<td>
										<xsl:value-of select="canssPerson_id"/><br/>
									</td>
									<td>
										<xsl:value-of select="canssPerson_name"/><br/>
									</td>
									<td>
										<xsl:value-of select="$v_type"/><br/>
									</td>
									<td>
										<xsl:value-of select="canssPerson_local_entrydate"/><br/>
									</td>
									<td style="text-align:left;">
										<xsl:variable name="v_pid" select="canssPerson_id" />
										<xsl:variable name="v_js_p_inform" select="js_p_inform" />
										<xsl:variable name="v_js_p_key_add" select="js_p_key_add" />
										<xsl:variable name="v_js_p_key_rm" select="js_p_key_rm" />
										
										<form id='frm_personlist_{$v_pid}' action='' method='post'>
											<input type='hidden' name='_rurl' value='mainframe.jsp?_pagenum=17' />
											<input type='hidden' name='_pid' value='{$v_pid}' />
											<input type='image' src='design/img/p_inform.png' style="width:20px;height:20px" 
												onclick="{$v_js_p_inform}"
												onmouseover="var o=getobj('div_p_desc');o.innerHTML='(가입 정보)';o.style.visibility='visible'"
												onmouseout="var o=getobj('div_p_desc');o.innerHTML='';o.style.visibility='hidden'"
												/>
											<xsl:if test="true()=js_p_key_add/text()">
												<xsl:if test="true()!=canssPerson_typeatt_key/text()">
													<input type='hidden' name='_method' value='add' />
													<input type='image' src='design/img/p_key_lock.png' style="width:20px;height:20px" 
														onclick="{$v_js_p_key_add}"
														onmouseover="var o=getobj('div_p_desc');o.innerHTML='(키 생성)';o.style.visibility='visible'; this.src='design/img/p_key.png';"
														onmouseout="var o=getobj('div_p_desc');o.innerHTML='';o.style.visibility='hidden'; this.src='design/img/p_key_lock.png';" 
													/>
												</xsl:if>
												<xsl:if test="true()=canssPerson_typeatt_key/text()">
													<input type='hidden' name='_method' value='remove' />
													<input type='image' src='design/img/p_key.png' style="width:20px;height:20px" 
														onclick="{$v_js_p_key_rm}"
														onmouseover="var o=getobj('div_p_desc');o.innerHTML='(키 제거)';o.style.visibility='visible'; this.src='design/img/p_key_lock.png'"
														onmouseout="var o=getobj('div_p_desc');o.innerHTML='';o.style.visibility='hidden'; this.src='design/img/p_key.png'" 
													/>
												</xsl:if>
											</xsl:if>
											<xsl:if test="$v_type!='OPERATOR'">
												<span type='submit' style="cursor:pointer" 
													onmouseover="
														this.style.color='red';
														var o=getobj('div_p_desc');o.innerHTML='(사용자 탈퇴)';o.style.visibility='visible';
													" 
													onmouseout="
														this.style.color='';
														var o=getobj('div_p_desc');o.innerHTML='';o.style.visibility='hidden';
													" 
													onclick="getobj('frm_personlist_{$v_pid}').target='';getobj('frm_personlist_{$v_pid}').action='http://mediator.canss.net/DatabaseManager/DeletePerson.php';getobj('frm_personlist_{$v_pid}').method='post';getobj('frm_personlist_{$v_pid}').submit();">
													절체
												</span>
											</xsl:if>
										</form>
									</td>
								</tr>
							</xsl:for-each>
							<tr>
								<td>-</td>
								<th class='xl69' colspan='5'>
									<span id="div_p_desc" style="visibility:hidden;text-align:right"></span>
								</th>
							</tr>
						</tbody>
					</table>
				</ol>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>